package com.manning.readinglist.config;

import org.mybatis.spring.mapper.MapperScannerConfigurer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Classname DataSourceSqlSessionConfig
 * @Description TODO
 * @Date 2020/5/21 11:30
 * @Created by seed
 */
@Configuration
public class DataSourceSqlSessionConfig {

    @Bean
    public MapperScannerConfigurer mapperScannerConfigurer() {
        MapperScannerConfigurer mapperScannerConfigurer = new MapperScannerConfigurer();
        mapperScannerConfigurer.setSqlSessionFactoryBeanName("sqlSessionFactory");
        mapperScannerConfigurer.setBasePackage("com.manning.readinglist.dao");
        return mapperScannerConfigurer;
    }
}
